﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="GuanLiKXX.aspx.cs" Inherits="Web.Pages.YongShui.JiChuXX.GuanLiKXX" Theme="Default" %>


<%@ Register Assembly="DevExpress.Web.v15.2, Version=15.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxTreeList.v15.2, Version=15.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxTreeList" TagPrefix="dx" %>
<%@ Register Src="../../../Control/UCAlert.ascx" TagName="UCAlert" TagPrefix="uc1" %>
<%@ Register Src="../../../Control/UCConfirm.ascx" TagName="UCConfirm" TagPrefix="uc2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>管理块信息</title>
    <script type="text/javascript">
        function keyEnter(index) {
            var controls = new Array();
            controls[0] = document.getElementById("txtGuanLiKH_I");
            controls[1] = document.getElementById("txtGuanLiKMC_I");
            controls[2] = document.getElementById("cmbZhanDianBH_I");
            controls[3] = document.getElementById("cmbQuKuaiLX_I");
            controls[4] = document.getElementById("btnSave");
            var key = event.keyCode;
            if (key == 13) {
                index = index + 1;
                if (index == controls.length) {
                    index = 0;
                }
                controls[index].focus();
            }
        }
    </script>
</head>

<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <div class="tabletitle1" align="center">
            管理块信息
        </div>

        <asp:UpdatePanel runat="server" ID="updatePanel1">
            <ContentTemplate>
                <table style="width: 98%; height: 400px">
                    <tr>
                        <td style="width: 50%" valign="top">
                            <div>
                                <dx:ASPxTreeList ID="treeGuanLiK" runat="server" Width="100%" KeyFieldName="BIANHAO" ParentFieldName="BELONGID"
                                    SettingsPager-AlwaysShowPager="true" AutoGenerateColumns="false" OnFocusedNodeChanged="treeGuanLiK_FocusedNodeChanged"
                                    EnableCallbacks="false">
                                    <Columns>
                                        <dx:TreeListDataColumn FieldName="ID" Visible="false"></dx:TreeListDataColumn>
                                        <dx:TreeListDataColumn FieldName="BELONGID" Visible="false"></dx:TreeListDataColumn>
                                        <dx:TreeListTextColumn FieldName="MINGCHENG" Caption="名称"></dx:TreeListTextColumn>
                                    </Columns>
                                    <Settings ShowColumnHeaders="false" />
                                    <SettingsBehavior AutoExpandAllNodes="true" AllowFocusedNode="true" ProcessFocusedNodeChangedOnServer="true" ExpandCollapseAction="NodeDblClick" />
                                    <SettingsText LoadingPanelText="正在加载请稍候......" />
                                    <Settings VerticalScrollBarMode="Auto" ScrollableHeight="530" />
                                </dx:ASPxTreeList>
                            </div>
                        </td>
                        <td style="width: 50%" align="center" valign="top">
                            <table>
                                <tr>
                                    <td align="right">管理块号：</td>
                                    <td align="left">
                                        <dx:ASPxTextBox ID="txtGuanLiKH" runat="server" MaxLength="20">

                                            <ClientSideEvents KeyPress="function(s,e){keyEnter(0);}" />
                                        </dx:ASPxTextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right">管理块名称：</td>
                                    <td align="left">
                                        <dx:ASPxTextBox ID="txtGuanLiKMC" runat="server" MaxLength="20">
                                            <ClientSideEvents KeyPress="function(s,e){keyEnter(1);}" />
                                        </dx:ASPxTextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right">站点编号：</td>
                                    <td align="left">
                                        <dx:ASPxComboBox ID="cmbZhanDianBH" runat="server" DropDownStyle="DropDownList" AutoPostBack="true" OnSelectedIndexChanged="cmbZhanDianBH_SelectedIndexChanged">
                                            <ClientSideEvents KeyPress="function(s,e){keyEnter(2);}" />
                                        </dx:ASPxComboBox>

                                    </td>
                                </tr>
                                <tr>
                                    <td align="right">站点名称：</td>
                                    <td align="left">
                                        <dx:ASPxComboBox ID="cmbZhanDianMC" runat="server" ValueType="System.String" Enabled="false">
                                        </dx:ASPxComboBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right">区块类型：</td>
                                    <td align="left">
                                        <dx:ASPxComboBox ID="cmbQuKuaiLX" runat="server" DropDownStyle="DropDownList">
                                            <ClientSideEvents KeyPress="function(s,e){keyEnter(3);}" />
                                        </dx:ASPxComboBox>
                                    </td>
                                </tr>
                            </table>
                            <br />
                            <div style="text-align: right;">

                                <hr />
                                <dx:ASPxButton ID="btnAdd" runat="server" Text="添加" OnClick="btnAdd_Click" UseSubmitBehavior="false"></dx:ASPxButton>
                                <dx:ASPxButton ID="btnEdit" runat="server" Text="修改" OnClick="btnEdit_Click" UseSubmitBehavior="false"></dx:ASPxButton>
                                <dx:ASPxButton ID="btnDel" runat="server" Text="删除" OnClick="btnDelete_Click" UseSubmitBehavior="false"></dx:ASPxButton>
                                <dx:ASPxButton ID="btnSave" runat="server" Text="保存" OnClick="btnSave_Click" UseSubmitBehavior="false">
                                    <ClientSideEvents Click="function(s, e) {
	                                               if (ASPxClientEdit.ValidateGroup('group')) {                 
                                                       e.processOnServer = true;             
                                                    } 
                                                    else 
                                                    { 
                                                       e.processOnServer = false; 
                                                    }
                                        }" />
                                </dx:ASPxButton>
                                <dx:ASPxButton ID="btnCancel" runat="server" Text="放弃" OnClick="btnCancel_Click" UseSubmitBehavior="false"></dx:ASPxButton>


                            </div>


                        </td>
                    </tr>
                </table>
                <div style="display: none;">
                    <asp:Button ID="btnDelFact" runat="server" Text="Button" OnClick="btnDelFact_Click" />
                    <asp:HiddenField ID="confirmValue" runat="server" />
                </div>
            </ContentTemplate>
        </asp:UpdatePanel>
    </form>
</body>

</html>
